#include "Sa2dDom.h"


agentSet::agentSet(){

}
string agentSet::getName() {
	return name;
}

std::vector<paramSet*> agentSet::getArtificialIntelligence() {
	return artificialIntelligence;
}

int agentSet::getElem_quantity() {
	return elem_quantity;
}

paramSet* agentSet::getInitialCondition() {
	return initialCondition;
}

geometry *agentSet::getGeometry() {
	return mygeometry;
}

physicalProperties *agentSet::getPhysicalProperties() {
	return myphysicalProperties;
}

std::vector<singularity*> agentSet::getSingularities() {
	return singularities;
}

void agentSet::setArtificialIntelligence(std::vector<paramSet*> artificialIntelligence) {
	this->artificialIntelligence = artificialIntelligence;
}

void agentSet::setElem_quantity(int elem_quantity) {
	this->elem_quantity = elem_quantity;
}

void agentSet::setInitialCondition(paramSet* initialCondition) {
	this->initialCondition = initialCondition;
}

void agentSet::setGeometry(geometry *mygeometry) {
	this->mygeometry = mygeometry;
}

void agentSet::setPhysicalProperties(physicalProperties *myphysicalProperties) {
	this->myphysicalProperties = myphysicalProperties;
}

void agentSet::setName(string name) {
	this->name = name;
}

void agentSet::setSingularities(std::vector<singularity*> singularities) {
	this->singularities = singularities;
}

void agentSet::addArtificialIntelligence(paramSet * ai){
	artificialIntelligence.push_back(ai);
}

void agentSet::addSingularity(singularity * singularity){
	singularities.push_back(singularity);
}

string agentSet::toString(int indent){
	stringstream returnString;
	string tabs = this->getIndent(indent);

	returnString << tabs << "Agent Set: \n";
	returnString << tabs << "Name: " << name << "\n";
	returnString << tabs << "Element Quantity: " << elem_quantity << "\n";
	returnString << "\n";
	returnString << mygeometry->toString(indent+1) <<"\n";
	returnString << myphysicalProperties->toString(indent+1) <<"\n";
	returnString << initialCondition->toString(indent+1);

	vector<singularity*>::iterator sing;
	for (sing = singularities.begin(); sing < singularities.end(); sing++) {
		returnString << "\n" << (*sing)->toString(indent + 1);
	}
	vector<paramSet*>::iterator ai;
	for (ai = artificialIntelligence.begin(); ai < artificialIntelligence.end(); ai++) {
		returnString << "\n" << (*ai)->toString(indent + 1);
	}
	return returnString.str();

}
